%label{:for => :name} Contest name:
=f.text_field :name

-if not defined? edit
  %label{:for => :set_code} Set code(A valid Linux filename):
  = f.text_field :set_code

%label Start Time:
/ TODO: **Трябва** да има по-хубав начин да се направи това.

Year:
= select_tag :year, options_for_select((Time.now.year)..(Time.now.year+2),@year?@year.to_i : Time.now.year.to_i)
Month:
= select_tag :month, options_for_select(1..12,@month?@month.to_i : Time.now.month.to_i)
Day:
/ TODO: Направи това да показва правилния брой дни за всеки месец.
= select_tag :day,options_for_select(1..31,@day?@day.to_i : Time.now.day.to_i)
Hour:
= select_tag :hour,options_for_select(0..23,@hour? @hour.to_i : Time.now.hour.to_i)
Minute:
= select_tag :minute,options_for_select(0..59,@minute? @minute.to_i : Time.now.min.to_i)

%label{:for => :duration} Duration:
= text_field_tag :duration, @duration
= select_tag :type,options_for_select({"minutes"=>1,"hours"=>60,"days"=>24*60,"weeks" => 7*24*60},@type)

%label{:for => :about} Information about the contest:
= f.text_field :about

= submit_tag (defined?(submit_text) ? submit_text : "Create contest")

